Completed
Push — master ( a97a29...ec6402 )
by Jonathan
09:06
created

autoloader.js ➔ constructor   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
import { UserAccount } from './user-account'
2
3
class Autoloader {
4
    constructor() {
5
        this.lazyLoad()
6
    }
7
8
    lazyLoad() {
9
        let page = $('meta[name="page"]').attr('content')
10
11
        switch (page) {
12
            case 'user-account':
13
                new UserAccount()
14
                break;
15
        }
16
    }
17
}
18
19
new Autoloader()
0 ignored issues
show
Unused Code Best Practice introduced by
The object created with new Autoloader() is not used but discarded. Consider invoking another function instead of a constructor if you are doing this purely for side effects.
Loading history...